﻿using bookmeetingroom.Data.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace bookmeetingroom.Helper
{
    public static class EntityHelper
    {

        public static void MarkAdded(this EntityBase entityBase)
        {
            entityBase.UpdatedBy = HttpContextHelper.Current.User.Identity.Name;
            entityBase.CreatedBy = HttpContextHelper.Current.User.Identity.Name;
            entityBase.UpdatedTime = DateTime.Now;
            entityBase.CreatedTime = DateTime.Now;


        }
        public static void MarkModified(this EntityBase entityBase)
        {
            entityBase.UpdatedBy = HttpContextHelper.Current.User.Identity.Name;
            entityBase.UpdatedTime = DateTime.Now;
        }
        public static void MarkDeleted(this EntityBase entityBase)
        {

        }

    }
}
